package gulimall.feign;

import gulimall.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 仓储服务远程调用
 *
 * @author HLF
 * @date 2022/6/13 12:02
 */
@Service
@FeignClient(value = "gulimall-ware", path = "/ware")
public interface WareFeignService {

    /**
     * 一定要使用post请求才能传输@RequestBody数据
     */
    @PostMapping("/waresku/hasStock")
    R hasStockBySkuIds(@RequestBody List<Long> skuIds);
}
